<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2022/6/10
  Time: 15:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery-3.6.0.js"></script>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <script type="text/javascript">
        $(document).ready(function () {
            $('button').click(function () {
                $.ajax({
                    url: '/web03_war_exploded/as',
                    type: 'get',
                    data: {
                        name: "zhangsan",
                        age: 20
                    },
                    dataType: 'json',
                    success(res) {
                        console.log(res)
                    }
                })
            })
        })
    </script>
</head>
<body>
<button class="btn btn-primary">ajax请求</button>
</body>
</html>